﻿@model Occupie.ViewModels.IndexViewModel

@{
    ViewBag.Title = "Начало";
}

<div class="wrapper cf">

    @if (Model.ShowEmailWarning)
    {
        @Html.Partial("ChangeEmail", Model.Student)
    }

    <!-- homepage content-->
    <div id="home-content">       
        <div id="filter-container-offers" class="cf">
            <figure>
                <figcaption>
                    <h6 class="heading">Последни обяви</h6>
                     @Html.Partial("_LatestOffersPartial", Model.Offers)
                </figcaption>
            </figure>
        </div>

        <div id="filter-container-blog" class="cf">
            <figure>
                <figcaption>

                    @{
                        int i = 0;
                    }

                    @foreach (var post in Model.BlogPosts)
                    {
                        i++;
                        <a href="@post.Link">
                            <h2>@post.Title</h2>
                        </a>
                        <h6>@post.Date</h6> 
                        <p>@Html.Raw(post.Summary)</p>
                        if (i != Model.BlogPosts.Count())
                        {                
                        <br />
                        }
                    }
                </figcaption>
            </figure>
        </div>

        <div class="latest-users">
            <figure>
                <figcaption>
                    <h6 class="heading">Последни студенти</h6>
                    @Html.Partial("_LatestStudentsPartial", Model.Students)
                </figcaption>
            </figure>
        </div>

        <div class="latest-users">
            <figure>
                <figcaption>
                    <h6 class="heading">Последни работодатели</h6>
                    @Html.Partial("_LatestCompaniesPartial", Model.Employers)
                </figcaption>
            </figure>
        </div>
        <!-- ENDS homepage content-->
    </div>
</div>
<!-- ENDS WRAPPER -->
